package com.shuwen.gcdj.entity.basics;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 设备表
 *
 * @TableName basics_equipment
 */
@TableName(value = "basics_equipment")
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class BasicsEquipment extends Model<BasicsEquipment> implements Serializable {
    /**
     * 主键id
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 设备名称
     */
    private String name;

    /**
     * 编号
     */
    private String code;

    /**
     * 类型
     */
    private Integer type;

    /**
     * 区域位置
     */
    private Integer areaLocation;

    /**
     * 安装位置
     */
    private Integer installLocation;

    /**
     * 管理员
     */
    private String manager;

    /**
     * 设计资料
     */
    private String resourceId;

    /**
     * 状态(0停止1运行)
     */
    private Integer state;

    /**
     * 创建者id
     */
    @TableField(fill = FieldFill.INSERT)
    private String createId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新者id
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateId;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 是否删除 1-删除 0-正常
     */
    private Integer isDelete;

    /**
     *
     */
    private String remark;

    /**
     * 投产日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate commissioningDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 设备台账类型配置
     */
    //private String equipmentTypeConfig;
}
